package com.fp.system;

import org.quartz.CronExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by haibiao.zhang on 17/1/5.
 */
@Configuration
@ConditionalOnClass(CronExpression.class)
public class CronSupportAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(CronOperator.class)
    public CronOperator cronOperator() {
        return new CronOperator();
    }

}
